Skip to content

fabtests/common: check the connect result in ft_init_fabric_cm() - #13196

Merged
j-xiong merged 1 commit into
ofiwg:mainfrom
sydidelot:fabtests-connect-check
Nov 12, 2026
Merged

j-xiong merged 1 commit into
ofiwg:mainfrom
sydidelot:fabtests-connect-check

Conversation

@sydidelot

Copy link
Copy Markdown
Member

ft_init_fabric_cm() ignored the return value of ft_client_connect() / ft_server_connect() before checking fi->caps for the FT_OPT_NO_PRE_POSTED_RX case. If connection setup failed before fi was allocated (e.g. fi_getinfo() returning -FI_ENODATA because the provider does not support FI_EP_MSG), the test dereferenced a NULL fi and crashed with SIGSEGV instead of returning the error.

runfabtests.sh reports a test as "Notrun" only if both sides exit with FI_ENODATA, so the crash turned an unsupported configuration into a failure:

fi_flood -e msg -v -T 1 -p "ofi_rxm;tcp"
server: fi_getinfo(): ret=-61 (No data available), exit 61
client: fi_getinfo(): ret=-61, then Segmentation fault, exit 139
-> result: Fail

Return the error as soon as connecting fails. The client now exits with 61 and the test is reported as Notrun.

ft_init_fabric_cm() ignored the return value of ft_client_connect() /
ft_server_connect() before checking fi->caps for the
FT_OPT_NO_PRE_POSTED_RX case.  If connection setup failed before fi was
allocated (e.g. fi_getinfo() returning -FI_ENODATA because the provider
does not support FI_EP_MSG), the test dereferenced a NULL fi and
crashed with SIGSEGV instead of returning the error.

runfabtests.sh reports a test as "Notrun" only if both sides exit with
FI_ENODATA, so the crash turned an unsupported configuration into a
failure:

  fi_flood -e msg -v -T 1 -p "ofi_rxm;tcp"
    server: fi_getinfo(): ret=-61 (No data available), exit 61
    client: fi_getinfo(): ret=-61, then Segmentation fault, exit 139
    -> result: Fail

Return the error as soon as connecting fails.  The client now exits
with 61 and the test is reported as Notrun.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Sylvain Didelot <sdidelot@ddn.com>
@j-xiong
j-xiong merged commit 4d83b56 into ofiwg:main Nov 12, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants